package com.bltec.emergency.service.resService.impl;

import com.bltec.emergency.mapper.ResHelicopterMapper;
import com.bltec.emergency.model.ResHelicopter;
import com.bltec.emergency.service.resService.ResHelicopterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ResHelicopterServiceImpl implements ResHelicopterService {
    @Resource
    private ResHelicopterMapper resHelicopterMapper;

    @Override
    public boolean add(ResHelicopter resHelicopter) {
        return resHelicopterMapper.insert(resHelicopter);
    }

    @Override
    public boolean deleteResHelicopterById(Long id) {
        return resHelicopterMapper.setDisableById(id);
    }

    @Override
    public boolean updateResHelicopterById(ResHelicopter resHelicopter) {
        return resHelicopterMapper.updateResHelicopterById(resHelicopter);
    }

    @Override
    public ResHelicopter getResHelicopterById(Long id) {
        return resHelicopterMapper.getResHelicopterById(id);
    }

    @Override
    public List<ResHelicopter> getAll() {
        return resHelicopterMapper.selectAll();
    }
}
